package org.example.extension.initializing;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Component;

@Component
public class CustomBean implements InitializingBean, DisposableBean {

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("CustomBean.afterPropertiesSet()");
        // custom initialization logic here
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("CustomBean.destroy()");
        // custom destruction logic here
    }
}
